package pl.edu.pk.adcampaignfacebook.integration;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


public class FeedMap {

	static Map<String, List<IntegrationPhoto>> feedMap = new HashMap<String, List<IntegrationPhoto>>();
	
	public static List<IntegrationPhoto> getFeedList(String username){
		List<IntegrationPhoto> returnList = feedMap.remove(username);
		if(returnList == null){
			return new ArrayList<IntegrationPhoto>();
		}
		return returnList;
	}
	
	public static void addPhoto(String username, IntegrationPhoto photo){
		List<IntegrationPhoto> returnList = feedMap.get(username);
		if(returnList == null) {
			returnList = new ArrayList<IntegrationPhoto>();
			feedMap.put(username, returnList);
			
		}
		returnList.add(photo);
	}
	
}
